maxValue = 200;
filePrefix = 'data/';

for nbCities = 3000:250:3000
    for i = 2:10
        fileP = strcat(filePrefix,num2str(nbCities),'/',num2str(i),'/');
        Cost = generateCosts(nbCities);
        mkdir(fileP);
        for j = 1:10
           GenCost = fillRandom(Cost,nbCities*nbCities/2,maxValue);
           
           cities = 1:nbCities;
           cities = cities(randperm(nbCities));
           [c result] = tsp(cities,2000,0.5,1000,nbCities/2,GenCost);
           count = calculateDists( result, GenCost, maxValue );
           file = strcat(fileP,'Result',num2str(j),'.dat');
           csvwrite(file, count);
           
           display(strcat('Cities-',num2str(nbCities),'-',num2str(i),'-',num2str(j)));
        end
    end
    
end


% filePrefix = 'data/70/';
% for i = 1:10
%     file = strcat(filePrefix,num2str(i),'/');
%     Cost = generateCosts(nbCities);
%     csvwrite(strcat(file,'baseCost.dat'),Cost);
%     
%     for j = 2000:500:3500
%        for k = 1:10
%            file = strcat(filePrefix,num2str(i),'/','genCost',num2str(j),'_',num2str(k),'.dat');
%            GenCost = fillRandom(Cost,j,1000);
%            csvwrite(file, GenCost);
%            
%            
%            
%            cities = 1:nbCities;
%            cities = cities(randperm(length(cities)));
%            [c result] = tsp(cities,2000,0.5,100,35,Cost);
%            file = strcat(filePrefix,num2str(i),'/','Result',num2str(j),'_',num2str(k),'.dat');
%            csvwrite(file, result);
%        end
%     end
%     
% end
